home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / org / flintparticles / counters / Blast.as next >
Encoding:
Text File  |  2011-10-17  |  1.5 KB  |  65 lines

  1. package org.flintparticles.counters
  2. {
  3.    import org.flintparticles.emitters.Emitter;
  4.    
  5.    public class Blast implements Counter
  6.    {
  7.        
  8.       
  9.       private var _startMax:uint;
  10.       
  11.       private var _startMin:uint;
  12.       
  13.       public function Blast(param1:Number, param2:Number = NaN)
  14.       {
  15.          super();
  16.          _startMin = param1;
  17.          _startMax = param2;
  18.       }
  19.       
  20.       public function set startMin(param1:Number) : void
  21.       {
  22.          _startMin = param1;
  23.       }
  24.       
  25.       public function set startMax(param1:Number) : void
  26.       {
  27.          _startMax = param1;
  28.       }
  29.       
  30.       public function updateEmitter(param1:Emitter, param2:Number) : uint
  31.       {
  32.          return 0;
  33.       }
  34.       
  35.       public function get startMax() : Number
  36.       {
  37.          return _startMax;
  38.       }
  39.       
  40.       public function startEmitter(param1:Emitter) : uint
  41.       {
  42.          if(_startMax)
  43.          {
  44.             return Math.round(_startMin + Math.random() * (_startMax - _startMin));
  45.          }
  46.          return Math.round(_startMin);
  47.       }
  48.       
  49.       public function get startCount() : Number
  50.       {
  51.          return _startMin == _startMax ? startMin : (startMax + startMin) * 0.5;
  52.       }
  53.       
  54.       public function get startMin() : Number
  55.       {
  56.          return _startMin;
  57.       }
  58.       
  59.       public function set startCount(param1:Number) : void
  60.       {
  61.          startMax = _startMin = param1;
  62.       }
  63.    }
  64. }
  65.